package fms.msgupcenter.protocols.uplinkmsg;

import javax.xml.bind.annotation.XmlAttribute;

/**
 * Created with IntelliJ IDEA.
 * User: Administrator
 * Date: 14-6-16
 * Time: 下午8:06
 * To change this template use File | Settings | File Templates.
 */
public class Sender
{
    @XmlAttribute(name="name")
    private SendRules.SenderType name;  // 通信方式名称
    @XmlAttribute(name="destination")
    private String destination; // 目的地（接收地址）
    @XmlAttribute(name="signature")
    private String signature;  // 签名（发送地址）
    @XmlAttribute(name="resend")
    private int resend;// 发送失败后的重发次数，默认值为0
    @XmlAttribute(name="delay")
    private int delay;  // 重发延迟时间，以秒为单位，默认值为0
    public Sender(){
        this.name = SendRules.SenderType.Default;
        this.destination = "";
        this.signature = "";
        this.resend = 0;
        this.delay = 0;
    }

    public Sender(SendRules.SenderType name, String destination, String signature, int resend, int delay)
    {
        this.name = name;
        this.destination = destination;
        this.signature = signature;
        this.resend = resend;
        this.delay = delay;
    }
}
